using System;

namespace Columbus
{
    /// <summary>
    /// Chooser class allows to mock choosers
    /// </summary>
    public static class Chooser
    {
        static Chooser()
        {
            ResetToDefaults();
        }

        /// <summary>
        /// Shows chooser (default implementation just executes specified action)
        /// </summary>
        public static Action<Action> Show;

        /// <summary>
        /// Gets or sets last result of invoked chooser.
        /// </summary>
        /// <value>Chooser last result.</value>
        public static ChooserResult LastResult { get; set; }

        /// <summary>
        /// Resets class actions and functions back to their default implementations
        /// </summary>
        public static void ResetToDefaults()
        {
            Show = action => action();
        }
    }
}